﻿using ConsoleTools;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NimLearning
{
    public class HumanPlayer : Player
    {
        public GameState GetMove(GameState state)
        {
            Console.WriteLine("Human Turn");
            bool validRow = false;
            
            int row = 0;

            while (!validRow)
            {
                row = ConsoleIO.GetInt("Select row: ", 1, 3);
                validRow = state[row - 1] != 0;
            }

            int count = ConsoleIO.GetInt("Select count: ", 1, state[row - 1]);

            state[row - 1] -= count;

            return state;
        }
    }
}
